<h3>Cart items</h3>

<table>
	<thead>
		<tr>
			<th>Name</th>
			<th>Description</th>
			<th>Price</th>
			<th>Quantity</th>
			<th>Total</th>
			<th>Remove</th>
		</tr>
	</thead>
	<tbody>
		<c:forEach items="${cart.items}" var="item" varStatus="s">
			<tr>
				<td>${item.product.name}</td>
				<td>${item.product.description}</td>
				<td><fmt:formatNumber type="currency" value="${item.product.price}" /></td>
				<td>${item.quantity}</td>
				<td><fmt:formatNumber type="currency" value="${item.itemPrice}" /> </td>
				<td>
					<form action="<c:url value="/cart/${s.index}" />" method="POST">
						<button class="link" name="_method" value="DELETE">Remove</button>
					</form>
				</td>
			</tr>
		</c:forEach>
	</tbody>
	<tfoot>
		<tr>
			<td colspan="2"></td>
			<th colspan="2">Total: </th>
			<th colspan="2">
				<fmt:formatNumber type="currency" value="${cart.total}" />
			</th>
		</tr>
	</tfoot>
</table>